import java.util.Random;
import java.util.Scanner;
public class test532 {
    public static void main(String[] args) {
        Random random = new Random();
        int digit1 = random.nextInt(10);
        int digit2;
        do {
            digit2 = random.nextInt(10);
        } while (digit2 == digit1);
        int lottery = digit1 * 10 + digit2;
        Scanner scanner = new Scanner(System.in);
        System.out.print("Enter your lottery pick (two digits): ");
        int guess = scanner.nextInt();
        int guessDigit1 = guess / 10;
        int guessDigit2 = guess % 10;
        System.out.println("The lottery number is " + lottery);
        if (guess == lottery) {
            System.out.println("Exact match: you win $10,000");
        } else if (guessDigit1 == digit2 && guessDigit2 == digit1) {
            System.out.println("Match all digits: you win $3,000");
        } else if (guessDigit1 == digit1 || guessDigit1 == digit2 || guessDigit2 == digit1 || guessDigit2 == digit2) {
            System.out.println("Match one digit: you win $1,000");
        } else {
            System.out.println("No match");
        }
        scanner.close();
    }
}
